#!/usr/bin/python3
# -*- coding: UTF-8 -*-

# 输出结果
def outResult(num):
  print('结果是:' + str(num))

def calculator():
  num1 = float(input('请输入第一个数字:'))
  op = input('请输入操作符:')
  num2 = float(input('请输入第二个数字:'))
  if op == '*':
    outResult(num1 * num2)
  elif op == '/':
    outResult(num1 / num2)
  elif op == '+':
    outResult(num1 + num2)
  elif op == '-':
    outResult(num1 - num2)
  else:
    print('无效操作符')

calculator()
